# 获取所有数字之和
def num_sum(num):
    set_w = set()
    jud = False
    sum = 0
    while num != 0:
        x = num % 10
        sum += x
        set_w.add(x)
        num //= 10
    if len(set_w) == 4:
        jud = True
    return sum, jud


for x in range(1000, 10000):
    sum, jud = num_sum(x)
    if sum == 6 and jud and x % 11 == 0:
        print(x, end=" ")